var Role = {
	Manage: {
		bannedRoleWindowContainer: '',
		unbannedRoleWindowContainer: '',
		bannedChatWindowContainer: '',
		unbannedChatWindowContainer: '',
		
		init: function() {
			Language.getCurrLanguage();
			Utils.loadJavascriptFile('/application/views/libraries/component/' + language + '.js');
			Utils.loadJavascriptFile('/application/views/libraries/utils/' + language + '.js');
			Utils.loadJavascriptFile('/application/views/module/Role/' + language + '.js');
			Utils.initAjax();
			
			Role.Manage.bannedRoleWindowContainer = $('#bannedRoleWindow');
			Role.Manage.unbannedRoleWindowContainer = $('#unbannedRoleWindow');
			Role.Manage.bannedChatWindowContainer = $('#bannedChatWindow');
			Role.Manage.unbannedChatWindowContainer = $('#unbannedChatWindow');
			Role.Manage.BannedRoleWindow.init();
			Role.Manage.UnbannedRoleWindow.init();
			Role.Manage.BannedChatWindow.init();
			Role.Manage.UnbannedChatWindow.init();
			Role.Manage.View.init();
		},
		
		View: {
			dataGridPanelContainer: '',
			
			init: function() {
				Role.Manage.View.dataGridPanelContainer = $('#dataGridPanel #dataGrid');
				Role.Manage.View.DataGrid.init();
			},
			
			DataGrid: {
				gameAreaCombogridLabelContainer: '',
				gameAreaCombogridInputContainer: '',
				accountValidateboxLabelContainer: '',
				accountValidateboxInputContainer: '',
				roleNameValidateboxLabelContainer: '',
				roleNameValidateboxInputContainer: '',
				searchButtonContainer: '',
				kickButtonContainer: '',
				bannedRoleButtonContainer: '',
				unbannedRoleButtonContainer: '',
				bannedChatButtonContainer: '',
				unbannedChatButtonContainer: '',
				
				init: function() {
					Role.Manage.View.DataGrid.gameAreaCombogridLabelContainer = $('#dataGridPanel #toolbar #gameAreaCombogridLabel');
					Role.Manage.View.DataGrid.gameAreaCombogridInputContainer = $('#dataGridPanel #toolbar #gameAreaCombogridInput');
					Role.Manage.View.DataGrid.accountValidateboxLabelContainer = $('#dataGridPanel #toolbar #accountValidateboxLabel');
					Role.Manage.View.DataGrid.accountValidateboxInputContainer = $('#dataGridPanel #toolbar #accountValidateboxInput');
					Role.Manage.View.DataGrid.roleNameValidateboxLabelContainer = $('#dataGridPanel #toolbar #roleNameValidateboxLabel');
					Role.Manage.View.DataGrid.roleNameValidateboxInputContainer = $('#dataGridPanel #toolbar #roleNameValidateboxInput');
					Role.Manage.View.DataGrid.searchButtonContainer = $('#dataGridPanel #toolbar #searchButton');
					Role.Manage.View.DataGrid.kickButtonContainer = $('#dataGridPanel #toolbar #kickButton');
					Role.Manage.View.DataGrid.bannedRoleButtonContainer = $('#dataGridPanel #toolbar #bannedRoleButton');
					Role.Manage.View.DataGrid.unbannedRoleButtonContainer = $('#dataGridPanel #toolbar #unbannedRoleButton');
					Role.Manage.View.DataGrid.bannedChatButtonContainer = $('#dataGridPanel #toolbar #bannedChatButton');
					Role.Manage.View.DataGrid.unbannedChatButtonContainer = $('#dataGridPanel #toolbar #unbannedChatButton');
					Role.Manage.View.DataGrid.create();
				},
				
				create: function() {
					var width = $(document).width() - 40;
					var height = $(document).height() - 40;
					Role.Manage.View.dataGridPanelContainer.width(width);
					Role.Manage.View.dataGridPanelContainer.height(height);
					Role.Manage.View.dataGridPanelContainer.datagrid({
						idField: "userId",
						toolbar: '#toolbar',
						sortName: 'userId',
						columns: [[
							{
								checkbox: true,
							},
							{
								field: 'userId',
								title: roleManageViewDataGridColumnTitle1,
								width: 120,
								sortable: true,
							},
							{
								field: 'roleId',
								title: roleManageViewDataGridColumnTitle2,
								width: 120,
							},
							{
								field: 'account',
								title: roleManageViewDataGridColumnTitle3,
								width: 100,
							},
							{
								field: 'roleName',
								title: roleManageViewDataGridColumnTitle4,
								width: 100,
							},
							{
								field: 'job',
								title: roleManageViewDataGridColumnTitle5,
								width: 60,
							},
							{
								field: 'sex',
								title: roleManageViewDataGridColumnTitle6,
								width: 60,
							},
							{
								field: 'level',
								title: roleManageViewDataGridColumnTitle7,
								width: 80,
								sortable: true,
							},
							{
								field: 'vipLevel',
								title: roleManageViewDataGridColumnTitle8,
								width: 80,
								sortable: true,
							},
							{
								field: 'battleValue',
								title: roleManageViewDataGridColumnTitle9,
								width: 100,
								sortable: true,
							},
							{
								field: 'token',
								title: roleManageViewDataGridColumnTitle10,
								width: 300,
							},
							{
								field: 'talkbanned',
								title: roleManageViewDataGridColumnTitle11,
								width: 100,
								formatter: function(value) {
									if(value == 0){
										return roleManageViewDataGridToolbarButtonText5;
									}
								}
							},
							{
								field: 'enable',
								title: roleManageViewDataGridColumnTitle12,
								width: 100,
								formatter: function(value) {
									if(value == 0){
										return roleManageViewDataGridToolbarButtonText2;
									}
								}
							},
						]],
						singleSelect: true,
						loadFilter: Utils.dataGridLoadFilter,
						pagination: true,
						pageSize: 50,
						pageList: [50, 100, 150, 200],
					});
					Component.Combogrid.GameArea.create(
						Role.Manage.View.DataGrid.gameAreaCombogridLabelContainer,
						Role.Manage.View.DataGrid.gameAreaCombogridInputContainer
					);
					Component.Validatebox.Account.create(
						Role.Manage.View.DataGrid.accountValidateboxLabelContainer,
						Role.Manage.View.DataGrid.accountValidateboxInputContainer
					);
					Component.Validatebox.RoleName.create(
						Role.Manage.View.DataGrid.roleNameValidateboxLabelContainer,
						Role.Manage.View.DataGrid.roleNameValidateboxInputContainer
					);
					Role.Manage.View.DataGrid.searchButtonContainer.linkbutton({
						iconCls: 'icon-search',
						text: roleManageViewDataGridToolbarButtonText1,
					});
					Role.Manage.View.DataGrid.searchButtonContainer.bind(
						'click',
						Role.Manage.View.DataGrid.doSearch
					);
					Role.Manage.View.DataGrid.kickButtonContainer.linkbutton({
						text: roleManageViewDataGridToolbarButtonText4,
					});
					Role.Manage.View.DataGrid.kickButtonContainer.bind(
						'click',
						Role.Manage.View.DataGrid.doKick
					);
					Role.Manage.View.DataGrid.bannedRoleButtonContainer.linkbutton({
						text: roleManageViewDataGridToolbarButtonText2,
					});
					Role.Manage.View.DataGrid.bannedRoleButtonContainer.bind(
						'click',
						Role.Manage.BannedRoleWindow.open
					);
					Role.Manage.View.DataGrid.unbannedRoleButtonContainer.linkbutton({
						text: roleManageViewDataGridToolbarButtonText3,
					});
					Role.Manage.View.DataGrid.unbannedRoleButtonContainer.bind(
						'click',
						Role.Manage.UnbannedRoleWindow.open
					);
					Role.Manage.View.DataGrid.bannedChatButtonContainer.linkbutton({
						text: roleManageViewDataGridToolbarButtonText5,
					});
					Role.Manage.View.DataGrid.bannedChatButtonContainer.bind(
						'click',
						Role.Manage.BannedChatWindow.open
					);
					Role.Manage.View.DataGrid.unbannedChatButtonContainer.linkbutton({
						text: roleManageViewDataGridToolbarButtonText6,
					});
					Role.Manage.View.DataGrid.unbannedChatButtonContainer.bind(
						'click',
						Role.Manage.UnbannedChatWindow.open
					);
				},
				
				load: function() {
					Role.Manage.View.dataGridPanelContainer.datagrid('reload');
				},
				
				getCheckedRows: function(allowMulti) {
					var allowMulti = arguments[0] ? arguments[0] : false;
					var checkedRow = Role.Manage.View.dataGridPanelContainer.datagrid('getChecked');
					
					if(Utils.dataGridValidateCheckedRow(checkedRow, allowMulti) === true) {
						return checkedRow;
					}
					else {
						return false;
					}
				},
				
				doSearch: function() {
					Role.Manage.View.dataGridPanelContainer.datagrid('clearChecked');
					Role.Manage.View.dataGridPanelContainer.datagrid({
						url: '/index.php/Role/manage/getListData',
						queryParams: {
							gameAreaId: Role.Manage.View.DataGrid.gameAreaCombogridInputContainer.combogrid('getValue'),
							account: Role.Manage.View.DataGrid.accountValidateboxInputContainer[0].value,
							roleName: Role.Manage.View.DataGrid.roleNameValidateboxInputContainer[0].value
						},
					});
				},
				
				doKick: function() {
					var checkedRow = Role.Manage.View.DataGrid.getCheckedRows();
					
					if( checkedRow != false ) {
						$.ajax({
							url: '/index.php/Role/manage/kick',
							data: {
								gameAreaId: Role.Manage.View.DataGrid.gameAreaCombogridInputContainer.combogrid('getValue'),
								userId: checkedRow[0].userId,
							}
						})
						.done(function(response) {
							if(response.errorCode === 0) {
								$.messager.alert(messageWindowTitle, roleManageViewDataGridKickSuccessInfo, 'info');
							}
						});
					}
				},
			},
		},
		
		BannedRoleWindow: {
			timeCycleTypeComboboxLabelContainer: '',
			timeCycleTypeComboboxInputContainer: '',
			timeCycleValidateboxLabelContainer: '',
			timeCycleValidateboxInputContainer: '',
			reasonValidateboxLabelContainer: '',
			reasonValidateboxInputContainer: '',
			submitButtonContainer: '',
			resetButtonContainer: '',
			
			init: function() {
				Role.Manage.BannedRoleWindow.timeCycleTypeComboboxLabelContainer = $('#bannedRoleWindow #timeCycleTypeComboboxLabel');
				Role.Manage.BannedRoleWindow.timeCycleTypeComboboxInputContainer = $('#bannedRoleWindow #timeCycleTypeComboboxInput');
				Role.Manage.BannedRoleWindow.timeCycleValidateboxLabelContainer = $('#bannedRoleWindow #timeCycleValidateboxLabel');
				Role.Manage.BannedRoleWindow.timeCycleValidateboxInputContainer = $('#bannedRoleWindow #timeCycleValidateboxInput');
				Role.Manage.BannedRoleWindow.reasonValidateboxLabelContainer = $('#bannedRoleWindow #reasonValidateboxLabel');
				Role.Manage.BannedRoleWindow.reasonValidateboxInputContainer = $('#bannedRoleWindow #reasonValidateboxInput');
				Role.Manage.BannedRoleWindow.submitButtonContainer = $('#bannedRoleWindow #submitButton');
				Role.Manage.BannedRoleWindow.resetButtonContainer = $('#bannedRoleWindow #resetButton');
				Role.Manage.BannedRoleWindow.create();
			},
			
			create: function() {
				Role.Manage.bannedRoleWindowContainer.window({
					title: roleManageBannedRoleWindowTitle,
					collapsible: false,
					minimizable: false,
					maximizable: false,
					closable: true,
					closed: true,
					modal: true,
				});
				Component.Combobox.TimeCycleType.create(
					Role.Manage.BannedRoleWindow.timeCycleTypeComboboxLabelContainer,
					Role.Manage.BannedRoleWindow.timeCycleTypeComboboxInputContainer
				);
				Component.Validatebox.TimeCycle.create(
					Role.Manage.BannedRoleWindow.timeCycleValidateboxLabelContainer,
					Role.Manage.BannedRoleWindow.timeCycleValidateboxInputContainer
				);
				Component.Validatebox.Reason.create(
					Role.Manage.BannedRoleWindow.reasonValidateboxLabelContainer,
					Role.Manage.BannedRoleWindow.reasonValidateboxInputContainer
				);
				Role.Manage.BannedRoleWindow.submitButtonContainer.linkbutton({
					iconCls: 'icon-ok',
					text: roleManageBannedRoleWindowSubmitButtonText,
				});
				Role.Manage.BannedRoleWindow.submitButtonContainer.bind(
					'click',
					Role.Manage.BannedRoleWindow.doSubmit
				);
				Role.Manage.BannedRoleWindow.resetButtonContainer.linkbutton({
					iconCls: 'icon-undo',
					text: roleManageBannedRoleWindowResetButtonText,
				});
				Role.Manage.BannedRoleWindow.resetButtonContainer.bind(
					'click',
					Role.Manage.BannedRoleWindow.doReset
				);
			},
			
			open: function() {
				var checkedRow = Role.Manage.View.DataGrid.getCheckedRows();
				
				if( checkedRow != false ) {
					Role.Manage.BannedRoleWindow.doReset();
					Role.Manage.bannedRoleWindowContainer.window('open');
				}
			},
			
			close: function() {
				Role.Manage.bannedRoleWindowContainer.window('close');
			},
			
			doSubmit: function() {
				var checkedRow = Role.Manage.View.DataGrid.getCheckedRows();
				
				$.ajax({
					url: '/index.php/Role/manage/bannedRole',
					data: {
						gameAreaId: Role.Manage.View.DataGrid.gameAreaCombogridInputContainer.combogrid('getValue'),
						userId: checkedRow[0].userId,
						bannedCycleValue: Role.Manage.BannedRoleWindow.timeCycleValidateboxInputContainer[0].value,
						bannedCycleType: Role.Manage.BannedRoleWindow.timeCycleTypeComboboxInputContainer.combobox('getValue'),
						reason: Role.Manage.BannedRoleWindow.reasonValidateboxInputContainer[0].value,
					}
				})
				.done(function(response) {
					if(response.errorCode === 0) {
						$.messager.alert(messageWindowTitle, roleManageBannedRoleWindowSubmitSuccessInfo, 'info');
						Role.Manage.BannedRoleWindow.close();
						Role.Manage.View.DataGrid.load();
					}
				});
			},
			
			doReset: function() {
				Role.Manage.BannedRoleWindow.timeCycleValidateboxInputContainer[0].value = '';
				Role.Manage.BannedRoleWindow.timeCycleTypeComboboxInputContainer.combobox('reset');
				Role.Manage.BannedRoleWindow.reasonValidateboxInputContainer[0].value = '';
			},
		},
		
		UnbannedRoleWindow: {
			reasonValidateboxLabelContainer: '',
			reasonValidateboxInputContainer: '',
			submitButtonContainer: '',
			resetButtonContainer: '',
			
			init: function() {
				Role.Manage.UnbannedRoleWindow.reasonValidateboxLabelContainer = $('#unbannedRoleWindow #reasonValidateboxLabel');
				Role.Manage.UnbannedRoleWindow.reasonValidateboxInputContainer = $('#unbannedRoleWindow #reasonValidateboxInput');
				Role.Manage.UnbannedRoleWindow.submitButtonContainer = $('#unbannedRoleWindow #submitButton');
				Role.Manage.UnbannedRoleWindow.resetButtonContainer = $('#unbannedRoleWindow #resetButton');
				Role.Manage.UnbannedRoleWindow.create();
			},
			
			create: function() {
				Role.Manage.unbannedRoleWindowContainer.window({
					title: roleManageUnbannedRoleWindowTitle,
					collapsible: false,
					minimizable: false,
					maximizable: false,
					closable: true,
					closed: true,
					modal: true,
				});
				Component.Validatebox.Reason.create(
					Role.Manage.UnbannedRoleWindow.reasonValidateboxLabelContainer,
					Role.Manage.UnbannedRoleWindow.reasonValidateboxInputContainer
				);
				Role.Manage.UnbannedRoleWindow.submitButtonContainer.linkbutton({
					iconCls: 'icon-ok',
					text: roleManageunbannedRoleWindowSubmitButtonText,
				});
				Role.Manage.UnbannedRoleWindow.submitButtonContainer.bind(
					'click',
					Role.Manage.UnbannedRoleWindow.doSubmit
				);
				Role.Manage.UnbannedRoleWindow.resetButtonContainer.linkbutton({
					iconCls: 'icon-undo',
					text: roleManageunbannedRoleWindowResetButtonText,
				});
				Role.Manage.UnbannedRoleWindow.resetButtonContainer.bind(
					'click',
					Role.Manage.UnbannedRoleWindow.doReset
				);
			},
			
			open: function() {
				var checkedRow = Role.Manage.View.DataGrid.getCheckedRows();
				
				if( checkedRow != false ) {
					Role.Manage.UnbannedRoleWindow.doReset();
					Role.Manage.unbannedRoleWindowContainer.window('open');
				}
			},
			
			close: function() {
				Role.Manage.unbannedRoleWindowContainer.window('close');
			},
			
			doSubmit: function() {
				var checkedRow = Role.Manage.View.DataGrid.getCheckedRows();
				
				$.ajax({
					url: '/index.php/Role/manage/unbannedRole',
					data: {
						gameAreaId: Role.Manage.View.DataGrid.gameAreaCombogridInputContainer.combogrid('getValue'),
						userId: checkedRow[0].userId,
						reason: Role.Manage.UnbannedRoleWindow.reasonValidateboxInputContainer[0].value,
					}
				})
				.done(function(response) {
					if(response.errorCode === 0) {
						$.messager.alert(messageWindowTitle, roleManageUnbannedRoleWindowSubmitSuccessInfo, 'info');
						Role.Manage.UnbannedRoleWindow.close();
						Role.Manage.View.DataGrid.load();
					}
				});
			},
			
			doReset: function() {
				Role.Manage.UnbannedRoleWindow.reasonValidateboxInputContainer[0].value = '';
			},
		},
		
		BannedChatWindow: {
			timeCycleTypeComboboxLabelContainer: '',
			timeCycleTypeComboboxInputContainer: '',
			timeCycleValidateboxLabelContainer: '',
			timeCycleValidateboxInputContainer: '',
			reasonValidateboxLabelContainer: '',
			reasonValidateboxInputContainer: '',
			submitButtonContainer: '',
			resetButtonContainer: '',
			
			init: function() {
				Role.Manage.BannedChatWindow.timeCycleTypeComboboxLabelContainer = $('#bannedChatWindow #timeCycleTypeComboboxLabel');
				Role.Manage.BannedChatWindow.timeCycleTypeComboboxInputContainer = $('#bannedChatWindow #timeCycleTypeComboboxInput');
				Role.Manage.BannedChatWindow.timeCycleValidateboxLabelContainer = $('#bannedChatWindow #timeCycleValidateboxLabel');
				Role.Manage.BannedChatWindow.timeCycleValidateboxInputContainer = $('#bannedChatWindow #timeCycleValidateboxInput');
				Role.Manage.BannedChatWindow.reasonValidateboxLabelContainer = $('#bannedChatWindow #reasonValidateboxLabel');
				Role.Manage.BannedChatWindow.reasonValidateboxInputContainer = $('#bannedChatWindow #reasonValidateboxInput');
				Role.Manage.BannedChatWindow.submitButtonContainer = $('#bannedChatWindow #submitButton');
				Role.Manage.BannedChatWindow.resetButtonContainer = $('#bannedChatWindow #resetButton');
				Role.Manage.BannedChatWindow.create();
			},
			
			create: function() {
				Role.Manage.bannedChatWindowContainer.window({
					title: roleManageBannedChatWindowTitle,
					collapsible: false,
					minimizable: false,
					maximizable: false,
					closable: true,
					closed: true,
					modal: true,
				});
				Component.Combobox.TimeCycleType.create(
					Role.Manage.BannedChatWindow.timeCycleTypeComboboxLabelContainer,
					Role.Manage.BannedChatWindow.timeCycleTypeComboboxInputContainer
				);
				Component.Validatebox.TimeCycle.create(
					Role.Manage.BannedChatWindow.timeCycleValidateboxLabelContainer,
					Role.Manage.BannedChatWindow.timeCycleValidateboxInputContainer
				);
				Component.Validatebox.Reason.create(
					Role.Manage.BannedChatWindow.reasonValidateboxLabelContainer,
					Role.Manage.BannedChatWindow.reasonValidateboxInputContainer
				);
				Role.Manage.BannedChatWindow.submitButtonContainer.linkbutton({
					iconCls: 'icon-ok',
					text: roleManageBannedChatWindowSubmitButtonText,
				});
				Role.Manage.BannedChatWindow.submitButtonContainer.bind(
					'click',
					Role.Manage.BannedChatWindow.doSubmit
				);
				Role.Manage.BannedChatWindow.resetButtonContainer.linkbutton({
					iconCls: 'icon-undo',
					text: roleManageBannedChatWindowResetButtonText,
				});
				Role.Manage.BannedChatWindow.resetButtonContainer.bind(
					'click',
					Role.Manage.BannedChatWindow.doReset
				);
			},
			
			open: function() {
				var checkedRow = Role.Manage.View.DataGrid.getCheckedRows();
				
				if( checkedRow != false ) {
					Role.Manage.BannedChatWindow.doReset();
					Role.Manage.bannedChatWindowContainer.window('open');
				}
			},
			
			close: function() {
				Role.Manage.bannedChatWindowContainer.window('close');
			},
			
			doSubmit: function() {
				var checkedRow = Role.Manage.View.DataGrid.getCheckedRows();
				
				$.ajax({
					url: '/index.php/Role/manage/bannedChat',
					data: {
						gameAreaId: Role.Manage.View.DataGrid.gameAreaCombogridInputContainer.combogrid('getValue'),
						userId: checkedRow[0].userId,
						bannedCycleValue: Role.Manage.BannedChatWindow.timeCycleValidateboxInputContainer[0].value,
						bannedCycleType: Role.Manage.BannedChatWindow.timeCycleTypeComboboxInputContainer.combobox('getValue'),
						reason: Role.Manage.BannedChatWindow.reasonValidateboxInputContainer[0].value,
					}
				})
				.done(function(response) {
					if(response.errorCode === 0) {
						$.messager.alert(messageWindowTitle, roleManageBannedChatWindowSubmitSuccessInfo, 'info');
						Role.Manage.BannedChatWindow.close();
						Role.Manage.View.DataGrid.load();
					}
				});
			},
			
			doReset: function() {
				Role.Manage.BannedChatWindow.timeCycleValidateboxInputContainer[0].value = '';
				Role.Manage.BannedChatWindow.timeCycleTypeComboboxInputContainer.combobox('reset');
				Role.Manage.BannedChatWindow.reasonValidateboxInputContainer[0].value = '';
			},
		},
		
		UnbannedChatWindow: {
			reasonValidateboxLabelContainer: '',
			reasonValidateboxInputContainer: '',
			submitButtonContainer: '',
			resetButtonContainer: '',
			
			init: function() {
				Role.Manage.UnbannedChatWindow.reasonValidateboxLabelContainer = $('#unbannedChatWindow #reasonValidateboxLabel');
				Role.Manage.UnbannedChatWindow.reasonValidateboxInputContainer = $('#unbannedChatWindow #reasonValidateboxInput');
				Role.Manage.UnbannedChatWindow.submitButtonContainer = $('#unbannedChatWindow #submitButton');
				Role.Manage.UnbannedChatWindow.resetButtonContainer = $('#unbannedChatWindow #resetButton');
				Role.Manage.UnbannedChatWindow.create();
			},
			
			create: function() {
				Role.Manage.unbannedChatWindowContainer.window({
					title: roleManageUnbannedChatWindowTitle,
					collapsible: false,
					minimizable: false,
					maximizable: false,
					closable: true,
					closed: true,
					modal: true,
				});
				Component.Validatebox.Reason.create(
					Role.Manage.UnbannedChatWindow.reasonValidateboxLabelContainer,
					Role.Manage.UnbannedChatWindow.reasonValidateboxInputContainer
				);
				Role.Manage.UnbannedChatWindow.submitButtonContainer.linkbutton({
					iconCls: 'icon-ok',
					text: roleManageunbannedChatWindowSubmitButtonText,
				});
				Role.Manage.UnbannedChatWindow.submitButtonContainer.bind(
					'click',
					Role.Manage.UnbannedChatWindow.doSubmit
				);
				Role.Manage.UnbannedChatWindow.resetButtonContainer.linkbutton({
					iconCls: 'icon-undo',
					text: roleManageunbannedChatWindowResetButtonText,
				});
				Role.Manage.UnbannedChatWindow.resetButtonContainer.bind(
					'click',
					Role.Manage.UnbannedChatWindow.doReset
				);
			},
			
			open: function() {
				var checkedRow = Role.Manage.View.DataGrid.getCheckedRows();
				
				if( checkedRow != false ) {
					Role.Manage.UnbannedChatWindow.doReset();
					Role.Manage.unbannedChatWindowContainer.window('open');
				}
			},
			
			close: function() {
				Role.Manage.unbannedChatWindowContainer.window('close');
			},
			
			doSubmit: function() {
				var checkedRow = Role.Manage.View.DataGrid.getCheckedRows();
				
				$.ajax({
					url: '/index.php/Role/manage/unbannedChat',
					data: {
						gameAreaId: Role.Manage.View.DataGrid.gameAreaCombogridInputContainer.combogrid('getValue'),
						userId: checkedRow[0].userId,
						reason: Role.Manage.UnbannedChatWindow.reasonValidateboxInputContainer[0].value,
					}
				})
				.done(function(response) {
					if(response.errorCode === 0) {
						$.messager.alert(messageWindowTitle, roleManageUnbannedChatWindowSubmitSuccessInfo, 'info');
						Role.Manage.UnbannedChatWindow.close();
						Role.Manage.View.DataGrid.load();
					}
				});
			},
			
			doReset: function() {
				Role.Manage.UnbannedChatWindow.reasonValidateboxInputContainer[0].value = '';
			},
		},
	},

	Login: {
		init: function() {
			Language.getCurrLanguage();
			Utils.loadJavascriptFile('/application/views/libraries/component/' + language + '.js');
			Utils.loadJavascriptFile('/application/views/libraries/utils/' + language + '.js');
			Utils.loadJavascriptFile('/application/views/module/Role/' + language + '.js');
			Utils.initAjax();
			
			Role.Login.View.init();
		},
		
		View: {
			dataGridPanelContainer: '',
			
			init: function() {
				Role.Login.View.dataGridPanelContainer = $('#dataGridPanel #dataGrid');
				Role.Login.View.DataGrid.init();
			},
			
			DataGrid: {
				gameAreaCombogridLabelContainer: '',
				gameAreaCombogridInputContainer: '',
				accountValidateboxLabelContainer: '',
				accountValidateboxInputContainer: '',
				roleNameValidateboxLabelContainer: '',
				roleNameValidateboxInputContainer: '',
				startDatetimeboxLabelContainer: '',
				startDatetimeboxInputContainer: '',
				endDatetimeboxLabelContainer: '',
				endDatetimeboxInputContainer: '',
				searchButtonContainer: '',
				
				init: function() {
					Role.Login.View.DataGrid.gameAreaCombogridLabelContainer = $('#dataGridPanel #toolbar #gameAreaCombogridLabel');
					Role.Login.View.DataGrid.gameAreaCombogridInputContainer = $('#dataGridPanel #toolbar #gameAreaCombogridInput');
					Role.Login.View.DataGrid.accountValidateboxLabelContainer = $('#dataGridPanel #toolbar #accountValidateboxLabel');
					Role.Login.View.DataGrid.accountValidateboxInputContainer = $('#dataGridPanel #toolbar #accountValidateboxInput');
					Role.Login.View.DataGrid.roleNameValidateboxLabelContainer = $('#dataGridPanel #toolbar #roleNameValidateboxLabel');
					Role.Login.View.DataGrid.roleNameValidateboxInputContainer = $('#dataGridPanel #toolbar #roleNameValidateboxInput');
					Role.Login.View.DataGrid.startDatetimeboxLabelContainer = $('#dataGridPanel #toolbar #startDatetimeboxLabel');
					Role.Login.View.DataGrid.startDatetimeboxInputContainer = $('#dataGridPanel #toolbar #startDatetimeboxInput');
					Role.Login.View.DataGrid.endDatetimeboxLabelContainer = $('#dataGridPanel #toolbar #endDatetimeboxLabel');
					Role.Login.View.DataGrid.endDatetimeboxInputContainer = $('#dataGridPanel #toolbar #endDatetimeboxInput');
					Role.Login.View.DataGrid.searchButtonContainer = $('#dataGridPanel #toolbar #searchButton');
					Role.Login.View.DataGrid.create();
				},
				
				create: function() {
					var width = $(document).width() - 40;
					var height = $(document).height() - 40;
					Role.Login.View.dataGridPanelContainer.width(width);
					Role.Login.View.dataGridPanelContainer.height(height);
					Role.Login.View.dataGridPanelContainer.datagrid({
						fitColumns: false,
						toolbar: '#toolbar',
						columns: [[
							{
								field: 'account',
								title: roleLoginViewDataGridColumnTitle1,
								width: 100,
							},
							{
								field: 'roleName',
								title: roleLoginViewDataGridColumnTitle2,
								width: 100,
							},
							{
								field: 'loginDatetime',
								title: roleLoginViewDataGridColumnTitle3,
								width: 150,
							},
							{
								field: 'loginIpAddress',
								title: roleLoginViewDataGridColumnTitle4,
								width: 100,
							},
						]],
						loadFilter: Utils.dataGridLoadFilter,
						pagination: true,
						pageSize: 50,
						pageList: [50, 100, 150, 200],
					});
					Component.Combogrid.GameArea.create(
						Role.Login.View.DataGrid.gameAreaCombogridLabelContainer,
						Role.Login.View.DataGrid.gameAreaCombogridInputContainer
					);
					Component.Validatebox.Account.create(
						Role.Login.View.DataGrid.accountValidateboxLabelContainer,
						Role.Login.View.DataGrid.accountValidateboxInputContainer
					);
					Component.Validatebox.RoleName.create(
						Role.Login.View.DataGrid.roleNameValidateboxLabelContainer,
						Role.Login.View.DataGrid.roleNameValidateboxInputContainer
					);
					Component.Datetimebox.Start.create(
						Role.Login.View.DataGrid.startDatetimeboxLabelContainer,
						Role.Login.View.DataGrid.startDatetimeboxInputContainer
					);
					Component.Datetimebox.End.create(
						Role.Login.View.DataGrid.endDatetimeboxLabelContainer,
						Role.Login.View.DataGrid.endDatetimeboxInputContainer
					);
					Role.Login.View.DataGrid.searchButtonContainer.linkbutton({
						iconCls: 'icon-search',
						text: roleLoginViewDataGridToolbarButtonText1,
					});
					Role.Login.View.DataGrid.searchButtonContainer.bind(
						'click',
						Role.Login.View.DataGrid.doSearch
					);
				},
				
				doSearch: function() {
					Role.Login.View.dataGridPanelContainer.datagrid({
						url: '/index.php/Role/login/getListData',
						queryParams: {
							gameAreaId: Role.Login.View.DataGrid.gameAreaCombogridInputContainer.combogrid('getValue'),
							account: Role.Login.View.DataGrid.accountValidateboxInputContainer[0].value,
							roleName: Role.Login.View.DataGrid.roleNameValidateboxInputContainer[0].value,
							startDateTime: Role.Login.View.DataGrid.startDatetimeboxInputContainer.datetimebox('getValue'),
							endDateTime: Role.Login.View.DataGrid.endDatetimeboxInputContainer.datetimebox('getValue'),
						}
					});
				},
			},
		},
	},

	bannedList: {
		init: function() {
			Language.getCurrLanguage();
			Utils.loadJavascriptFile('/application/views/libraries/component/' + language + '.js');
			Utils.loadJavascriptFile('/application/views/libraries/utils/' + language + '.js');
			Utils.loadJavascriptFile('/application/views/module/Role/' + language + '.js');
			Utils.initAjax();

			Role.bannedList.View.init();
		},

		View: {
			dataGridPanelContainer: '',

			init: function() {
				Role.bannedList.View.dataGridPanelContainer = $('#dataGridPanel #dataGrid');
				Role.bannedList.View.DataGrid.init();
			},

			DataGrid: {
				gameAreaCombogridLabelContainer: '',
				gameAreaCombogridInputContainer: '',
				bannedTypeComboboxLabelContainer: '',
				bannedTypeComboboxInputContainer: '',
				searchButtonContainer: '',

				init: function() {
					Role.bannedList.View.DataGrid.gameAreaCombogridLabelContainer = $('#dataGridPanel #toolbar #gameAreaCombogridLabel');
					Role.bannedList.View.DataGrid.gameAreaCombogridInputContainer = $('#dataGridPanel #toolbar #gameAreaCombogridInput');
					Role.bannedList.View.DataGrid.bannedTypeComboboxLabelContainer = $('#dataGridPanel #toolbar #bannedTypeComboboxLabel');
					Role.bannedList.View.DataGrid.bannedTypeComboboxInputContainer = $('#dataGridPanel #toolbar #bannedTypeComboboxInput');
					Role.bannedList.View.DataGrid.searchButtonContainer = $('#dataGridPanel #toolbar #searchButton');
					Role.bannedList.View.DataGrid.create();
				},

				create: function() {
					var width = $(document).width() - 40;
					var height = $(document).height() - 40;
					Role.bannedList.View.dataGridPanelContainer.width(width);
					Role.bannedList.View.dataGridPanelContainer.height(height);
					Role.bannedList.View.dataGridPanelContainer.datagrid({
						rownumbers : true,
						fitColumns: false,
						toolbar: '#toolbar',
						columns: [[

							//{
							//	field: 'roleName',
							//	title: '角色',
							//	width: 200
							//},
							//{
							//	field: 'money',
							//	title: '',
							//	width: 100
							//},

						]],
						loadFilter: Utils.dataGridLoadFilter,
						pagination: false,
						pageSize: 50,
						pageList: [50, 100, 150, 200],
					});
					Component.Combogrid.GameArea.create(
						Role.bannedList.View.DataGrid.gameAreaCombogridLabelContainer,
						Role.bannedList.View.DataGrid.gameAreaCombogridInputContainer
					);
					Component.Combobox.BannedType.create(
						Role.bannedList.View.DataGrid.bannedTypeComboboxLabelContainer,
						Role.bannedList.View.DataGrid.bannedTypeComboboxInputContainer
					);

					Role.bannedList.View.DataGrid.searchButtonContainer.linkbutton({
						iconCls: 'icon-search',
						text: roleManageViewDataGridToolbarButtonText1,
					});
					Role.bannedList.View.DataGrid.searchButtonContainer.bind(
						'click',
						Role.bannedList.View.DataGrid.doSearch
					);
				},

				doSearch: function() {
					Role.bannedList.View.dataGridPanelContainer.datagrid({
						url: '/index.php/Role/bannedList/getListData',
						queryParams: {
							gameAreaId: Role.bannedList.View.DataGrid.gameAreaCombogridInputContainer.combogrid('getValue'),
							bannedTypeId: Role.bannedList.View.DataGrid.bannedTypeComboboxInputContainer.combobox('getValue'),
						}
					});
				},
			},
		},
	},
}